import http from '@/utils/request'

/**
 * 获取列表数据
 * @module apis/shop
 */
export function fetchList(data: object) {
  return http.get('/api/shop/list', data)
}
/**
 * 获取主键数据
 */
export function fetchById(id: string) {
  return http.get('/api/shop/' + id)
}
/**
 * 新增数据
 */
export function create(data: object) {
  return http.post('/api/shop', data)
}
/**
 * 更新数据
 */
export function update(data: object) {
  return http.put('/api/shop', data)
}
/**
 * 移除数据
 */
export function remove(id: string) {
  return http.delete('/api/shop/' + id)
}
export default {
  fetchList,
  create,
  fetchById,
  update,
  remove
}
